<script setup>

</script>


<template>
  <div class="order-index">
    <div class="left-side">
      <h2>我的账户</h2>
      <div class="links">
        <RouterLink to="/my/account">个人中心</RouterLink>
      </div>
      <div class="line"></div>
      <h2>交易管理</h2>
      <div class="links">
        <RouterLink to="/my/orderList">我的订单</RouterLink>
      </div>
    </div>
    <div class="right-side">
      <router-view></router-view>
    </div>
  </div>
</template>

<style scoped lang="scss">
.order-index {
  display: flex;
  flex-direction: row;
  max-width: 1240px;
  margin: 20px auto;

  .left-side {
    display: flex;
    flex-direction: column;
    width: 20%;
    padding: 20px 0;
    margin-right: 20px;
    background-color: #f7fdfa;
    border-bottom: 1px solid #ccc;

    .line {
     border-bottom: 1px solid #ccc;
    }
    h2 {
      padding: 5px 40px;
    }

    a {
      display: block;
      line-height: 1;
      padding: 15px 50px;
      font-size: 18px;
      color: #666;
      position: relative;

      &:hover {
        color: #27ba9b;
      }

      &.active,
      &.router-link-exact-active {
        color: #27ba9b;

        &:before {
          display: block;
        }
      }

      &:before {
        content: '';
        display: none;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        position: absolute;
        top: 19px;
        left: 40px;
        background-color: #27ba9b;
      }
    }
  }

  .right-side {
    width: 80%;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }
}

</style>